﻿Imports System.Drawing

Public Class PlayerCitiesFactory
    Public Shared Function GetCitiesForPlayerNumber(ByVal playerNumber As Integer) As CityCollection
        If (playerNumber < 1 Or playerNumber > 5) Then
            Throw New Exception("Programmer error: must pass in a number between 1 - 5")
        End If

        Dim cities As New CityCollection()

        If (playerNumber = 1) Then
            cities.cities(0) = New City(New Point(313, 188))
            cities.cities(1) = New City(New Point(408, 189))
            cities.cities(2) = New City(New Point(316, 332))
            cities.cities(3) = New City(New Point(448, 289))
            cities.cities(4) = New City(New Point(402, 351))
        ElseIf (playerNumber = 2) Then
            cities.cities(0) = New City(New Point(51, 156))
            cities.cities(1) = New City(New Point(130, 113))
            cities.cities(2) = New City(New Point(143, 41))
            cities.cities(3) = New City(New Point(213, 72))
            cities.cities(4) = New City(New Point(292, 41))
        ElseIf (playerNumber = 3) Then
            cities.cities(0) = New City(New Point(470, 41))
            cities.cities(1) = New City(New Point(580, 43))
            cities.cities(2) = New City(New Point(545, 113))
            cities.cities(3) = New City(New Point(717, 102))
            cities.cities(4) = New City(New Point(631, 181))
        ElseIf (playerNumber = 4) Then
            cities.cities(0) = New City(New Point(742, 266))
            cities.cities(1) = New City(New Point(653, 308))
            cities.cities(2) = New City(New Point(740, 348))
            cities.cities(3) = New City(New Point(584, 364))
            cities.cities(4) = New City(New Point(538, 424))
        ElseIf (playerNumber = 5) Then
            cities.cities(0) = New City(New Point(17, 266))
            cities.cities(1) = New City(New Point(74, 307))
            cities.cities(2) = New City(New Point(17, 350))
            cities.cities(3) = New City(New Point(119, 370))
            cities.cities(4) = New City(New Point(175, 430))
        End If

        Return cities
    End Function
End Class
